<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="org.apache.shiro.web.filter.authc.FormAuthenticationFilter"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>${fns:getConfig('productName')} 登录</title>
	<meta name="decorator" content="default"/>
	<link rel="shortcut icon" href="${ctxStatic }/images/favicon.ico">
	<style type="text/css">
    <style>
*{margin:0px;padding:0px;font-size:12px;color:#333;}
body{background:url(${ctxStatic}/images/new_login_bg.jpg) center top; font-family: '微软雅黑'; width:100%;height:100%; background-size: cover;}
.wrap{width:100%; margin:0 auto;}
.x_bg{ background:url(${ctxStatic}/images/new_x_bg.png) no-repeat;background-size:contain;
; width:100%; height:300px;margin-top:100px;margin-left:30%;padding-top:160px;padding-left:60px;}
.mtop{margin-top:12px;}
.l_title{
color:#fff; font-size:16px;  letter-spacing: 1px; margin:10px 5px; }
.weiht10{width:250px; line-height:25px; min-height:25px; height:25px;}
.btnh10{width:110px;font-family: '微软雅黑';height:35px; margin:20px 4px; font-size: 18px; color:#170000; background:url(${ctxStatic}/images/btn_bg.png) no-repeat;}
.ufont{color:#fff; font-size:16px;letter-spacing: 1px;vertical-align: middle;}
</style>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#loginForm").validate({
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("请填写用户名和密码。");
				}
			});
		});
		// 如果在框架中，则跳转刷新上级页面
		if(self.frameElement && self.frameElement.tagName=="IFRAME"){
			parent.location.reload();
		}
	</script>
</head>
<body>
 <%String error = (String) request.getAttribute(FormAuthenticationFilter.DEFAULT_ERROR_KEY_ATTRIBUTE_NAME);
 %>
	<div class="wrap">
    <div class="x_bg">
         <form id="loginForm" class="form-signin" action="${ctx}/login" method="post">
<!-- 		<div id="messageBox" class="alert alert-error <%=error==null?"hide":""%>" style="width:225px;"><button data-dismiss="alert" class="close" >×</button>登录失败, 请重试.</div> -->
		
            <div class="form-group">
              <p class="l_title">登录名</p>
              <label for="disabledTextInput"></label>
              <input  type="text" id="username" name="username" class="form-control weiht10 required" placeholder="">
            </div>
            <div class="form-group">
              <p class="l_title">密&nbsp;&nbsp;&nbsp;码</p>
              <label for="disabledTextInput"></label>
              <input type="password" id="password" name="password"  class="form-control weiht10 required" placeholder="">
            </div>
            <div class="form-group" >
            <label id="messageBox" style=" <%=error==null?"display:none;":""%> color:red;">登录失败, 请重试.</label>
             </div>
              <div>
            <button type="submit" class="btn btnh10">登&nbsp;&nbsp;录</button>
              <label for="rememberMe" title="下次不需要再登录" style="color:#fff" >
                <input type="checkbox" id="rememberMe" name="rememberMe" /> 记住我（公共场所慎用）
              </label>
              </div>
            <div  style="display:inline; margin-left:480px;padding-top:10px;clear:both;"  >
		       	<%-- <img src="${ctxStatic}/images/icon_come.png" width="25px" /> <a style="color:#fff" href="/zxims/t/login"><span class="ufont">进入核销系统</span></a> --%>
		       	<%-- <a class="dropdown-toggle" data-toggle="dropdown" href="#">${fns:getDictLabel(theme,'theme','')}<b class="caret" ></b></a> --%>
			    <ul class="dropdown-menu">
			      <c:forEach items="${fns:getDictList('theme')}" var="dict"><li><a href="?theme=${dict.value}">${dict.label}</a></li></c:forEach>
			    </ul>
			    <!--[if lte IE 6]><script type="text/javascript">$('#theme').hide();</script><![endif]-->
		    </div>
	        </form>
    </div>
   <p style="color:#fff; text-align:center;padding-top:15px;"> Copyright  2012-2015 <a href="http://www.hdzhx.com/" target="_blank">Jakemanse</a> - Powered By <a href="http://www.hdzhx.com/" target="_blank">微引擎科技</a> V1.0</p>
</div>
</body>
</html>
